package com.zy.constant;

/**
 * 业务响应状态码
 */
public enum BusinessEnum {
    /**
     * 外部访问
     */
    OPERATION_FAIL(-1, "操作失败"),
    SERVER_INNER_ERROR(9999, "服务器内部错误"),
    UN_AUTHORIZATION(401, "未授权"),
    ACCESS_DENY_FAIL(403, "权限不足，请联系管理员")
    ;

    /**
     * 有参构造
     * @param code
     * @param desc
     */
    BusinessEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    private Integer code;
    private String desc;
}
